<?php
$this->pageTitle = Yii::app()->name . ' - Change Password';
CHtml::$afterRequiredLabel = '';

if($msg = Yii::app()->user->getFlash('password')) {
    echo '<div class="flash-success">' . $msg . '</div>';
}
?>

<h1>Change Password</h1>

<?php
$form = $this->beginWidget('CActiveForm', array(
    'errorMessageCssClass' => 'alert-text',
    'enableClientValidation' => false,
    ));
?>

<div class="form-row">
    <?php
    echo $form->labelEx($model, 'password');
    echo $form->passwordField($model, 'password', array(
	'placeholder' => 'Current Password',
	'required' => ''
    ));
    echo $form->error($model, 'password');
    ?>
</div>

<div class="form-row">
    <?php
    echo $form->labelEx($model, 'newPassword');

    echo $form->passwordField($model, 'newPassword', array(
	'placeholder' => 'New Password',
	'required' => ''
    ));
    echo $form->error($model, 'newPassword');
    ?>
</div>

<div class="form-row">
    <?php
    echo $form->labelEx($model, 'confirmPassword');
    echo $form->passwordField($model, 'confirmPassword', array(
	'placeholder' => 'Confirm Password',
	'required' => ''
    ));
    echo $form->error($model, 'confirmPassword');
    ?>
</div>

<div class="form-row">
    <?php
    echo CHtml::submitButton('Change Password', array(
	'class' => 'action'
    ));
    ?>
</div>

<?php $this->endWidget(); ?>